<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .out {
            display: flex;
        }
        
        span {
            background-color: pink;
            height: 100px;
            width: 100px;
        }
        
        .div1,
        .div2 {
            background-color: red;
        }
        
        span.div3 {
            background-color: green;
        }
    </style>
</head>

<body>
    <div class="out">
        <span class="div1">第1个元素是span</span>
        <span class="div2">第2个元素是span</span>
        <span class="div3">第3个元素是span</span>
        <span class="div4">第4个元素是span</span>
        <span class="div5">第5个元素是span</span>
    </div>
</body>

</html>